﻿/* index.h */
#define IDX_NODE_EXIST		0
#define IDX_NODE_NOT_EXIST	1
#define IDX_SUCCESS		10
#define IDX_NODE_INCREASE	2049
#define IDX_NODE_NULL		30000000
#define	IDX_INIT_SUCCESS	0
#define	IDX_INIT_FAIL		1

STATE idx_init(INIT_TYPE init_type, char* g_image, char* index_log);
STATE idx_search(char* key, int key_len, PTR_DISK* disk_location, int* slot_cnt, int* last_slot_info);
STATE idx_insert(char* key, int key_len, PTR_DISK disk_location, int slot_cnt, int last_slot_info);
STATE idx_delete(char* key, int key_len, PTR_DISK* disk_location);
void  idx_show();
void idx_exit();

